import 'package:flutter/cupertino.dart';
import 'package:caose/export/caose_widget.dart';
import 'package:rebase_project/src/base/widget/defalut_page_state_widget.dart';
import 'package:rebase_project/src/module/item/item_mmp.dart';
import 'package:rebase_project/src/provider/Mmp2Notify.dart';

//
class Test4Widget extends StatefulWidget with CreateProvider<Mmp3Notify> {
  @override
  _Test4WidgetState createState() => _Test4WidgetState();

  @override
  createSingleValue(BuildContext context) {
    return Mmp3Notify();
  }
}

class _Test4WidgetState extends State<Test4Widget>
    with BaseWidget<Test4Widget, Mmp3Notify>, DefalutPageStateWidgetMixin {
  @override
  Future initData() {
    return mController.load();
  }

  @override
  Widget initView(BuildContext context) {
    return Container(
      child: Dazzle2().customScrollView([
        MmpItem(),
        MmpItem2(),
        MmpItem3(),
        MmpItem4(),
        NoMoreWidget(),
        NoDataWidget(mainPixel: 500),
        MoreDataWidget(),
      ], dataList: [
        true,
        1.0,
        1.0,
        1.0,
        1.0,
        1.0,
        1.0,
        1.0,
        1.0,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        "1",
        "1",
        "1",
        "1",
        "1",
        "1",
        "1",
        "1",
        "1",
        "",
        "",
        1,
        1.0,
        NoMoreData()
      ]),
    );
  }

  @override
  Widget title(BuildContext context) =>
      CNavigatorBar.create(title: "测试4").build(context);
}
